import { service } from '@/utils/request'


export async function pageList(page, size) {
    return await service({
        url: `/api/users/` + page + '/' + size,
        method: 'get',
        // data
    })
}

export async function pageNameList(page, size, name) {
    return await service({
        url: `/api/users/logname/` + page + '/' + size + '?logname=' + name,
        method: 'get',
        // data
    })
}

export async function add(data) {
    return await service({
        url: `/api/users`,
        method: 'post',
        data
    })
}

export async function remove(id) {
    return await service({
        url: `/api/users/` + id,
        method: 'delete'
    })
}

export async function update(id, data) {
    return await service({
        url: `/api/users/` + id,
        method: 'put',
        data
    })
}